﻿using System.Collections.Generic;
using VMukti.Business.CommonDataContracts;

namespace VMukti.Business.WCFServices.BootStrapServices.NetP2P
{    
    public class NetP2PBootStrapDelegates : INetP2PBootStrapService
    {
        public delegate void DelsvcNetP2PServiceJoin(string sSuperNodeIP);
        public delegate void DelsvcNetP2PAddUser(string uName);
        public delegate void DelsvcNetP2PRemoveUser(string uName);
        public delegate void DelsvcNetP2PGetBuddyInfo(string uName);
        public delegate void DelsvcNetP2PReturnBuddyInfo(string uName, List<string> lstMyBuddyList);
        public delegate void DelsvcNetP2PAddBuddies(string username, string BuddyName, string BuddyStatus);
		
		public delegate void DelsvcNetP2PRemoveBuddies(string username, string BuddyName);
        
        public delegate void DelsvcNetP2PGetSuperNodeBuddyStatus(string uName);
        public delegate void DelsvcNetP2PReturnSuperNodeBuddyStatus(string uName, List<string> lstSNBuddyList);
        public delegate void DelsvcNetP2PUnJoin(string uName);
        public delegate void DelsvcNetP2PSetSpecialMsg(string from,string to, string msg, clsModuleInfo objModInfo,string IPAddress);
        //public delegate void DelsvcNetP2PPageSetSpecialMsg(string from, string to, string msg, List<clsModuleInfo> lstModuleInfo, string IPAddress);
        public delegate void DelsvcNetP2PPageSetSpecialMsg(string from, string to, string msg, clsPageInfo objPageInfo, string IPAddress);
        public delegate void DelsvcSetRemoveDraggedBuddy(string from, List<string> to, string msg, clsModuleInfo objModInfo, string IPAddress);
        public delegate void DelsvcAddDraggedBuddy(string from, string to, string msg, clsModuleInfo objModInfo, string IPAddress);
        public delegate void DelsvcAddPageDraggedBuddy(string from, string to, string msg, List<clsModuleInfo> lstModuleInfo, string IPAddress);
       

        public event DelsvcNetP2PServiceJoin EntsvcNetP2PServiceJoin;
        public event DelsvcNetP2PAddUser EntsvcNetP2PAddUser;
        public event DelsvcNetP2PRemoveUser EntsvcNetP2PRemoveUser;
        public event DelsvcNetP2PGetBuddyInfo EntsvcNetP2PGetBuddyInfo;
        public event DelsvcNetP2PReturnBuddyInfo EntsvcNetP2PReturnBuddyInfo;
		public event DelsvcNetP2PAddBuddies EntsvcNetP2PAddBuddies;

		public event DelsvcNetP2PRemoveBuddies EntsvcNetP2PRemoveBuddies;
		
        public event DelsvcNetP2PGetSuperNodeBuddyStatus EntsvcNetP2PGetSuperNodeBuddyStatus;
        public event DelsvcNetP2PReturnSuperNodeBuddyStatus EntsvcNetP2PReturnSuperNodeBuddyStatus;
        public event DelsvcNetP2PUnJoin EntsvcNetP2PUnJoin;
        public event DelsvcNetP2PSetSpecialMsg EntsvcNetP2PSetSpecialMsg;
        public event DelsvcNetP2PPageSetSpecialMsg EntsvcNetP2PPageSetSpecialMsg;
        public event DelsvcSetRemoveDraggedBuddy EntsvcSetRemoveDraggedBuddy;
        public event DelsvcAddDraggedBuddy EntsvcAddDraggedBuddy;
        public event DelsvcAddPageDraggedBuddy EntsvcAddPageDraggedBuddy;
       

        public void svcNetP2PServiceJoin(string sSuperNodeIP)
        {
            if (EntsvcNetP2PServiceJoin != null)
            {
                EntsvcNetP2PServiceJoin(sSuperNodeIP);
            }
        }

        public void svcNetP2PAddUser(string uName)
        {
            if (EntsvcNetP2PAddUser != null)
            {
                EntsvcNetP2PAddUser(uName);
            }
        }

        public void svcNetP2PRemoveUser(string uName)
        {
            if (EntsvcNetP2PRemoveUser != null)
            {
                EntsvcNetP2PRemoveUser(uName);
            }
        }

        public void svcNetP2PGetBuddyInfo(string uName)
        {
            if (EntsvcNetP2PGetBuddyInfo != null)
            {
                EntsvcNetP2PGetBuddyInfo(uName);
            }
        }

        public void svcNetP2PReturnBuddyInfo(string uName, List<string> lstMyBuddyList)
        {
            if (EntsvcNetP2PReturnBuddyInfo != null)
            {
                EntsvcNetP2PReturnBuddyInfo(uName, lstMyBuddyList);
            }
        }

        public void svcNetP2PGetSuperNodeBuddyStatus(string uName)
        {
            if (EntsvcNetP2PGetSuperNodeBuddyStatus != null)
            {
                EntsvcNetP2PGetSuperNodeBuddyStatus(uName);
            }
        }

        public void svcNetP2PReturnSuperNodeBuddyStatus(string uName, List<string> lstSNBuddyList)
        {
            if (EntsvcNetP2PReturnSuperNodeBuddyStatus != null)
            {
                EntsvcNetP2PReturnSuperNodeBuddyStatus(uName, lstSNBuddyList);
            }
        }

        public void svcNetP2PUnJoin(string uName)
        {
            if (EntsvcNetP2PUnJoin != null)
            {
                EntsvcNetP2PUnJoin(uName);
            }
        }

        public void svcSetSpecialMsg(string from,string to, string msg, clsModuleInfo objModInfo,string IPAddress)
        {
            if(EntsvcNetP2PSetSpecialMsg!=null)
            {
                EntsvcNetP2PSetSpecialMsg(from, to, msg, objModInfo, IPAddress);
            }
        }

        public void svcSetSpecialMsg(string from, string to, string msg, clsPageInfo objPageInfo,string IPAddress)
        {
            if (EntsvcNetP2PPageSetSpecialMsg != null)
            {
                EntsvcNetP2PPageSetSpecialMsg(from, to, msg, objPageInfo, IPAddress);
            }
        }

        public void svcSetRemoveDraggedBuddy(string from, List<string> to, string msg, clsModuleInfo objModInfo, string IPAddress)
        {
            if (EntsvcSetRemoveDraggedBuddy != null)
            {
                EntsvcSetRemoveDraggedBuddy(from, to, msg, objModInfo, IPAddress);
            }
        }

        public void svcAddDraggedBuddy(string from, string to, string msg, clsModuleInfo objModInfo, string IPAddress)
        {
            if (EntsvcAddDraggedBuddy != null)
            {
                EntsvcAddDraggedBuddy(from, to, msg, objModInfo, IPAddress);
            }
        }

        public void svcAddDraggedBuddy(string from, string to, string msg, List<clsModuleInfo> lstModuleInfo, string IPAddress)
        {
            if (EntsvcAddPageDraggedBuddy != null)
            {
                EntsvcAddPageDraggedBuddy(from, to, msg, lstModuleInfo, IPAddress);
            }
        }

        public void svcAddBuddies(string username, string BuddyName, string BuddyStatus)
        {
            if (EntsvcNetP2PAddBuddies != null)
            {
                EntsvcNetP2PAddBuddies(username, BuddyName, BuddyStatus);
            }
        }


		public void svcRemoveBuddies(string username, string BuddyName)
		{
			if(EntsvcNetP2PRemoveBuddies != null)
			{
				EntsvcNetP2PRemoveBuddies(username,BuddyName);
			}
			
		}

		
	}
}
